package rabbit.flt.plugins.springmvc.matcher;

import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.matcher.ElementMatcher;

import static net.bytebuddy.matcher.ElementMatchers.*;

public class ServiceMatcher extends ComponentMatcher {

    @Override
    public ElementMatcher.Junction<TypeDescription> classMatcher() {
        return hasAnnotation(annotationType(named("org.springframework.stereotype.Service")))
                .and(not(isInterface()))
                // 不增强自带的Component
                .and(not(nameStartsWith("org.springframework")));
    }

}
